********************************************
*****************OVERVIEW*******************
********************************************
Comparative Political Studies (CPS) Dataverse Replication materials: "The Pigmentocracy of Executive Approval," by Shane P. Singh and Ryan E. Carlin

Below is a description of the data files, the analysis files, and the codebook, as well as step-by-step instructions for the replication of the content of all figures and associated discussion in the article and Supplementary Material.



********************************************
***********COMPUTE ENVIRONMENT**************
********************************************
Operating system:						Mac OS X Monterey (10 Core Apple M1 Max; 64 GB LPDDR5 Memory)
Statistical software versions					Stata/MP 17.0 for Mac (Apple Silicon) Revision 19 Dec 2023
								R 4.2.1 High Sierra Build
								RStudio 2022.07.1 for macOSEstimated run time for all analyses				10 minutesPackages used in analysis						Stata	
									COEFPLOT (http://repec.sowi.unibe.ch/stata/coefplot/getting-started.html)
									ECLPLOT (https://www.researchgate.net/publication/4997640_ECLPLOT_Stata_module_to_generate_estimates_and_confidence_limits_plots)
									LABUTIL (https://ideas.repec.org/c/boc/bocode/s402501.html) 								
								R
									DPLYR (https://dplyr.tidyverse.org/)
									JPEG (https://cran.r-project.org/web/packages/jpeg/index.html)
									READXL (https://readxl.tidyverse.org/)
									
									

********************************************
**********REPLICATING THE ANALYSIS**********
********************************************

************
**Necessary Files
************
AmericasBarometer_Singh_and_Carlin_CPS.dta				AmericasBarometer survey data with merged information on macroeconomic conditions from the World Bank and International Labour Organization
ANES_Singh_and_Carlin_CPS.dta					American National Election Studies survey data
Complexion_Ratings.dta						MTurker's facial skin tone ratings of leaders and self-assessed skin tone
Complexion_Ratings.xls						Facial skin tone ratings of leaders by survey for creation of Figure A1
Complexion_Ratings_with_Obama.dta					MTurker's facial skin tone ratings of Obama
Leader_Images.zip						Compressed file containing leader images
Replication, Main Text.do						Code for reproducing the analyses and figures in the main textReplication, Supplementary Material.do				Code for reproducing the analyses and figures in the Supplementary Material, aside from Figure A1
Replication, Figure A1.R						Code for creating Figure A1



************
**Instructions and Further Description
************
1. Download all of the necessary files listed above to the same working folder.

2. Set your working directory in Stata to the folder in which you stored all of the necessary files.

3. Replicate the analyses in the main text. Open and run “Replication, Main Text.do”. The included code will reproduce the content shown in the figures displayed in the main text. It also provides code for analyses behind claims made in the main text. 

4. Replicate the analyses in the Supplementary Material. Open and run “Replication, Supplementary Material.do”. The included code will reproduce the content shown in the tables and figures displayed in the Supplementary Material, with the exception of Figure A1. It also provides code for analyses behind claims made in the Supplementary Material.

5. Create Figure A1. Extract the image files from "Leader_Images.zip" into a folder called "Leader_Images". Open and run “Replication, Figure A1.R”. You will need to update two file pathways at the top of the “Replication, Figure A1.R” file following the instructions listed there. 



********************************************
****************OTHER FILES*****************
********************************************
Codebook.pdf						Describes each variable used in the analyses and gives information on coding and measurement 
readme.txt						This file



********************************************
************REPLICATION CONTACT*************
********************************************
Shane P. Singh
singh@uga.edu
www.shanepsingh.com
https://scholar.google.com/citations?hl=en&user=GZ2ePRkAAAAJ




